how to solve variance of lottery